<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\Article */

$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => '文章', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="article-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('删除', ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => '您确定删除本篇文章?',
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'id',
            //'xa_t_id',
            [
                'attribute' =>'xa_t_id',
                'value' => function ($model) {
                    return $model->fication($model->xa_t_id);
                },

            ],
            'xa_title',
            'xa_abstract',
            'xa_title_picture',
            'xa_content:ntext',
            'xa_author',
            'xa_type',
            'xa_keywords',
            'xa_description',
            'xa_souch',
            'xa_auditing',
            'xa_state',
            'xa_status',
            'xa_operation',
            'xa_headlines',
            'xa_top',
            'xa_recommend',
            'xa_c_id',
            'xa_browse',
            'xa_thumbs',
            'xa_enclosure_id',
            'xa_create_time',
            'xa_update_time',
            'xa_remark',
        ],
    ]) ?>

</div>
